#include<bits/stdc++.h>
using namespace std;
void solve(){
	int n;
	string s;
	cin>>n>>s;
	if((n%2==0&&s=="yura")||(n%2==1&&s=="wolxy"))cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
}
int main(){
	int t;cin>>t;
	while(t--){
		solve();
	}
	return 0;
} 
